A conventional storage system cannot meet a user requirement for massive data storage, and therefore a distributed storage system emerges. Although the distributed storage system can meet the user requirement, a network latency of the distributed storage system is relatively long. Consequently, the distributed storage system can be applied only to a latency-insensitive application scenario.
FIG. 1 is a schematic structural diagram of a distributed network storage system. As shown in FIG. 1, the distributed network storage system includes a metadata management node and multiple data nodes. The metadata management node manages a namespace of the distributed network storage system, for example, opening, closing, renaming a file or a directory, maintains mapping of a file path onto a data block, monitors heartbeats of the data nodes, and maintains a quantity of data block copies. The data nodes are used to manage data stored on their own nodes. Generally, a file is divided into one or more data blocks, and these data blocks are stored on a group of data nodes. To ensure high reliability of the distributed network storage system, at least one backup data node is disposed for each main data node. As shown in FIG. 1, a data node 1 is a main data node, and a data node 2 and a data node 3 are backup data nodes of the data node 1. A client first sends a data storage request to the metadata management node when the client write data, and the metadata management node returns metadata of the data to the client, where the metadata includes an address of a destination data node of the data, and the destination data node is the data node 1. The client first writes the data into the data node 1. Then, the data node 1 writes the data into the data node 2, and the data node 2 then writes the data into the data node 3. Then, the data node 3 returns an acknowledgement response to the data node 2, the data node 2 returns an acknowledgement response to the data node 1, and the data node 1 returns an acknowledgement response to the client. The client determines that the data is successfully written into the distributed network storage system when the client receives the acknowledgement response, and the client sends a file closing command to the metadata management node.
According to the foregoing descriptions, when a client writes data into a main data node, and the main data node writes the data into a backup data node, multiple times of network operations need to be performed, and a latency of one time of network operation is about 200 microseconds (μs). Therefore, a network latency of the distributed network storage system is relatively long.